package com.hgyc.mom.system.controller;


import com.hgyc.mom.common.vo.Result;
import com.hgyc.mom.system.service.SysRoleUserService;
import com.hgyc.mom.system.vo.RoleUserVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 系统角色用户信息 前端控制器
 * </p>
 *
 * @author fwj
 * @since 2025-01-16
 */
@RestController
@RequestMapping("/sys/roleUser")
public class SysRoleUserController {

    @Autowired
    private SysRoleUserService sysRoleUserService;

    @RequestMapping(value = "/updateRoleMenu", method = RequestMethod.POST)
    public Result<?> updateRoleUser(@RequestBody RoleUserVO roleUserVO) {
        sysRoleUserService.updateRoleUser(roleUserVO);
        return Result.success("保存成功");
    }

    @RequestMapping(value = "/del", method = RequestMethod.POST)
    public Result<?> removeBatch(@RequestBody RoleUserVO roleUserVO) {
        sysRoleUserService.removeBatch(roleUserVO);
        return Result.success("删除成功");
    }

}
